<%@ page language="java"
         contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<%@ page isELIgnored="false" %>
<!-- isELIgnored=true禁用EL表达式 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!-- JSTL格式化标签 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="${pageContext.request.contextPath}/js/jquery.min-2.1.1.js"></script>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/layui-v2.6.13/layui/css/index.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/layui-v2.6.13/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/layui-v2.6.13/layui/css/indexstyle.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/layui-v2.6.13/layui/layui.js"></script>
</head>
<body id="list-cont class= layui-bg-black">
<div class="site-nav-bg">
    <div class="site-nav w1200">
        <p class="sn-back-home">
            <i class="layui-icon layui-icon-home"></i>
            <a href="${pageContext.request.contextPath}/shop/shopPage">首页</a>
        </p>
        <%--        <p class="sn-back-home">--%>
        <%--            <i class="layui-icon layui-icon-home"></i>--%>
        <%--            <a href="${pageContext.request.contextPath}/admin/main">后台页面</a>--%>
        <%--        </p>--%>
        <div class="sn-quick-menu">
            <div class="sp-cart"><i class="layui-icon layui-icon-form"></i><a style="margin-left: 5px"
                                                                              href="${pageContext.request.contextPath}/shop/goods/orderPage">我的订单</a>
            </div>
            <div class="sp-cart" style="margin-left: 15px"><i class="layui-icon layui-icon-cart-simple"></i><a
                    style="margin-left: 5px" href="${pageContext.request.contextPath}/car/carPage">购物车</a></div>

            <c:if test="${sessionScope.u.id != null}">
                <div style="margin-left: 10px">
                    <a href="${pageContext.request.contextPath}/user/userPage">
                        <div><i class="layui-icon layui-icon-user"></i>&nbsp;&nbsp;欢迎用户:<span>${sessionScope.u.uName}</span></div>
                    </a>
                </div>
            </c:if>
            <c:if test="${sessionScope.u.id == null}">
                <div>
                    <div class="login" style="margin-left: 15px"><i class="layui-icon layui-icon-user"></i><a
                            style="margin-left: 5px" href="${pageContext.request.contextPath}/mall/login">登录</a></div>
                </div>
            </c:if>
        </div>
    </div>
</div>
<tr>
    <div class="layui-row" style="width: 900px; height:900px;margin: 0 auto;background-color: white;">
        <div class="layui-col-md3" style=" width: 200px;height: 200px;padding-top: 50px;">
            <img style="width: 100%" src="${goodsInfos.imgUrl}"/>
        </div>
        <div class="layui-col-md9" style="padding-top: 50px;">
            <table width="25%">
                <tr>
                    <td>
                        <p class="layui-font-black" style="font-size: 20px;">
                            商品名称:<span>${goodsInfos.gName}</span>
                        </p>
                    </td>
                </tr>

                <br/>
                <tr>
                    <td class="layui-font-20 layui-font-black">下单数量:
                        ${buyCount}
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="color: orangered;font-size: 20px;">
                            单价:￥${goodsInfos.gPrice}</div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="color: orangered;font-size: 24px;">
                            <span style="color: red">总价格:￥${order.orderMoney}</span>
                        </div>
                    </td>
                </tr>
            </table>

            <button class="layui-btn layui-btn-warm" style="width: 150px;" onclick="openPayPass('${order.orderNo}')">支付</button>

        </div>
    </div>
</tr>

</body>
<script>
    // 打开输入密码弹出层
    layui.use(['layer'], function () {
        var layer = layui.layer;
    });
    function openPayPass(orderNo){
        layer.open({
            type: 2,
            area: ['350px', '200px'],
            title: "输入支付密码",
            content: '${pageContext.request.contextPath}/shop/goods/payPass?orderNo='+ orderNo,
            yes: function(index) {
                layer.close(index);
            },
        })
    }

</script>
</html>
